import { GET } from './common';

const baseApi = '/cas/account';

const getUserInfo = () => {
  return GET({
    url: `${baseApi}/user`
  });
};

const getAccountInfo = ({ accountId }) => {
  return GET({
    url: baseApi,
    params: { accountId }
  });
};

const getAccountList = ({ pageNumber, pageSize, sortField, sortOrder }) => {
  return GET({
    url: `${baseApi}/list`,
    params: {
      pageSize,
      pageNumber,
      sortOrder,
      sortField
    }
  });
};

export default {
  getUserInfo,
  getAccountInfo,
  getAccountList
}
